function judge(text) {
  const pattern = /^[\u4e00-\u9fa5]{2,4}$/;
  return pattern.test(text);
}

console.log(judge("abcd"));
console.log(judge("中"));
console.log(judge("中国"));
console.log(judge("中国富强"));
console.log(judge("中国富强民主"));
